package com.example.com.ustc.btplayer;

import com.example.com.ustc.btplayer.MyImageView.OnViewClick;
import com.nmbb.oplayer.R;
import com.nmbb.oplayer.ui.FragmentOnline;
import com.nmbb.oplayer.ui.MainActivity;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.view.WindowManager;

public class HomeUi extends Activity {

	MyImageView play,browse,bt,online,viewcut;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);           //���ñ�������ʽ
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);  //ȫ��
        setContentView(R.layout.home_ui);
        
        play = (MyImageView)findViewById(R.id.home_play);
        browse = (MyImageView)findViewById(R.id.home_browse);
        bt = (MyImageView)findViewById(R.id.home_bt);
        online = (MyImageView)findViewById(R.id.home_online);
        viewcut = (MyImageView)findViewById(R.id.home_viewcut);
        
        play.setOnClickListener(listener);
        browse.setOnClickListener(listener);
        bt.setOnClickListener(listener);
        online.setOnClickListener(listener);
        viewcut.setOnClickListener(listener);
             
    }
    
    public OnClickListener listener = new OnClickListener() {
		
		public void onClick(View v) {
			// TODO Auto-generated method stub
			Intent intent = new Intent();
			switch(v.getId())
			{
			case R.id.home_play:
				intent.setClass(HomeUi.this,MainActivity.class);
				startActivity(intent);
				break;
			case R.id.home_browse:
				MainActivity.Setp(0);
				intent.setClass(HomeUi.this,MainActivity.class);
				startActivity(intent);
				break;
			case R.id.home_bt:
				break;
			case R.id.home_viewcut:
				break;			
			case R.id.home_online:
				MainActivity.Setp(1);
				intent.setClass(HomeUi.this,MainActivity.class);
				startActivity(intent);
				break;
				default:
					break;
			}
			
		}
	};
    
}
